<script>
    // ...

    // 合并对象
    let obj1 = { a: 1, b: 2 };
    let obj2 = { c: 3, d: 4 };
    let mergeObj = { ...obj1, ...obj2, e: 5 };
    console.log(mergeObj);

    // 合并数组
    let arr1 = [1, 2, 3];
    let arr2 = [4, 5, 6];
    let mergeArr = [...arr1, ...arr2, 7];
    console.log(mergeArr);

    // 接受剩余值
    let pigFamily = ["猪爸爸", "猪妈妈", "佩奇", "乔治"];
    let [father, mother, ...children] = pigFamily;
    console.log(father);
    console.log(mother);
    console.log(children);

    // 跳过某个数组元素,接受剩余参数
    let manStars = ["刘国梁", "马龙", "樊振东", "王楚钦", "林诗栋"];
    let [, ...player] = manStars;
    console.log(player);
</script>